#include<iostream>
#include<opencv2/imgcodecs.hpp>
#include<opencv2/highgui.hpp>
#include<opencv2/imgproc.hpp>
#include<opencv2/objdetect.hpp>
#include<opencv2/opencv.hpp>
#include<opencv2/ximgproc.hpp>
#include<string>
#include<vector>
#include<fstream>
#include <fcntl.h>
#include <termios.h>

using namespace std;
using namespace cv;

struct Result {
    int targetX;
    int targetY;
    int laserX;
    int laserY;
};

//云台//
void _Gimbal__init();//云台启动函数

//二值化//
void targetBinarization(const Mat& img, Mat& targetBinImg); //目标图像二值化函数

void towardbinarization(Mat img,Mat& towardBinImg);//激光指向二值化函数

//识别//
Result recognize(const Mat& target_bin_img, const Mat& toward_bin_img, Mat& img);//激光点和目标颜色识别函数
//人脸识别
void facerecognize_init(CascadeClassifier& faceCasade);//人脸识别初始化函数
void facerecognize(Mat img,vector<Rect>& faces,CascadeClassifier& faceCasade,Result& result);//人脸识别函数

//串口通信//
int _usart_init__();//串口初始化函数

int _usart_send__(int arr[4]);//串口发送函数
